home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / tdk_v136.zip / DOORKIT.DOC < prev    next >
Text File  |  1997-08-14  |  48KB  |  890 lines

  1.  ╔═══════════════════════════════════════════════════════════════════════════╗
  2.  ║     FIRST THINGS FIRST - READ THE FILE WARNING.TXT BEFORE PROCEEDING!     ║
  3.  ╚═══════════════════════════════════════════════════════════════════════════╝
  4.  
  5.                              ┌╦══╦┐ ┌╦══╦┐ ┌╦═══╦┐
  6.                              │╠══╩╗┐│╠══╩╗┐└╩═══╦┐
  7.                              └╩═══╩┘└╩═══╩┘└╩═══╩┘
  8.         ┌╦   ╦┐┌═╤╦╤═┐┌═╤╦╤═┐┌╔     ┌═╤╦╤═┐┌═╤╦╤═┐┌╔═══╦┐┌╔═══╦┐┌════╦┐
  9.         │║   ║│  │║│    │║│  │║       │║│    │║│  │╬══   │╬══   ┌─╔═╝─┘
  10.         └╩═══╩┘  ╧╩╧  └═╧╩╧═┘└╩═══╩┘└═╧╩╧═┘  ╧╩╧  └╩═══╩┘└╩═══╩┘└╚════┘
  11.             ┌╦═══╦┐┌╦═══╦┐┌╔═══╦┐┌═╤╦╤═┐┌╦   ╦┐┌╦═══╦┐┌╦═══╦┐┌╔═══╦┐
  12.             └╩═══╦┐│║   ║││╬══     │║│  │║ ╦ ║│├╬═══╬┤│╠══╦╩┘│╬══
  13.             └╩═══╩┘└╩═══╩┘└╩       ╧╩╧  └╩═╩═╩┘└╩   ╩┘└╩  ╚═┘└╩═══╩┘ <tm>
  14.  
  15.                             A Subsidary Of LA-Soft
  16.  
  17. ───────────────────────────────────────────────────────────────────────────────
  18.    ▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀    ▀▀   ▀▀
  19.      ▀▀     ▀▀   ▀▀   ▀▀  ▀▀
  20.     ▀▀     ▀▀   ▀▀▀  ▀▀▀▀▀  The DoorKit!
  21.    ▀▀     ▀▀   ▀▀   ▀▀  ▀▀
  22.   ▀▀     ▀▀▀▀▀▀    ▀▀    ▀▀
  23.   The BBS Door Development Kit By The People - For The People!
  24. ───────────────────────────────────────────────────────────────────────────────
  25.   The ANSI/ASCII/RIP/MAX DoorKit v1.36
  26.   No Copyright Notices Expressed Or Implied
  27.   Compiled By Larry L. Athey From Numerous Sources
  28. ───────────────────────────────────────────────────────────────────────────────
  29.  
  30.  
  31.   The Contributors:
  32.   ─────────────────
  33.   This is a list of people who contributed to the cause of beta testing the
  34.   MAX Graphics related programs and the TDK door development kit.  Although
  35.   there were more people who applied to be beta testers, most of these beta
  36.   sites never posted anything in the support echo, so I don't consider them
  37.   to have made any contribution to the cause. But, these people stood by me
  38.   and my efforts without a single sour word, and never threw in the towel..
  39.  
  40.   Many people apply to be a beta tester for new programs and never think of
  41.   the qwerks involved in testing untested software. So they quickly give up
  42.   and avoid beta testing like the plague. Beta testing requires a person to
  43.   do nearly as much work (if not actually more) as the programmer themself.
  44.  
  45.   Programs can't evolve without testers actually running the program and at
  46.   least trying to make it work even with the bugs in it.  True beta testers
  47.   don't seem to know the meaning of the phrase "I give up", and that's what
  48.   makes being a program author worth while. I couldn't give a damn if I get
  49.   one more program registration in my life,  so long as there are dedicated
  50.   common sense thinking people like this standing by you, it's worth while!
  51.  
  52.         Let's here it for the people that refused to say "I give up"!
  53.  
  54.   Name:                          BBS:                            Phone:
  55.   ───────────────────────────────────────────────────────────────────────────
  56.   Brad Larned (1:205/400)        The Fresno Online BBS           209-276-3657
  57.   Sean Price (1:205/46)          Sanctuary From The Law BBS      619-377-3611
  58.   Chris Martin (1:219/308)       The Mars Station BBS            760-254-3012
  59.   Bob Wingender (1:284/11)       The Oak Tree BBS                417-581-0868
  60.   Chet Rhodes (1:151/124)        Hawkmoon's Realm                919-556-8363
  61.   Larry Thrasher (1:3612/650)    The Night Thrasher BBS          904-937-9144
  62.   Thomas Wells (1:3621/1)        Renegade's Hideout              615-326-5597
  63.   Timothy Barney (1:2622/3)      The Gravel Pit                  814-942-1552
  64.   Cliff Williams (1:112/124)     The City Of Thought             904-645-8850
  65.   Jon Parise (1:2606/421)        Infinite Twilight               908-637-8243
  66.   Arthur Stark (1:395/670)       Top's Diamond Mine              254-542-8783
  67.   Ronald Schlegel (1:110/1065)   Dynasty BBS                     937-258-1030
  68.   David Raasch (1:280/285)       Let It Shine Online!            816-461-2290
  69.   ───────────────────────────────────────────────────────────────────────────
  70.  
  71.   NOTE: These names appear in no particular order, they are only listed here
  72.         as the names appear in my MAX Graphics area message base...
  73.  
  74.  
  75. ───────────────────────────────────────────────────────────────────────────────
  76.  
  77.  
  78.   NOTE: The DoorKit! requires you to have Turbo Pascal 7.0 or Borland Pascal
  79.         7.0 With Objects. Certain compiler directives in these units are not
  80.         compatible with Turbo Pascal 6.0....If you have Turbo Pascal 6.0 you
  81.         will have to make a number of modifications to this kit.  Sorry, but
  82.         since I don't use TP6.0, I cannot assist you with any modifications.
  83.  
  84.  
  85. ───────────────────────────────────────────────────────────────────────────────
  86.  
  87.  
  88.   Welcome to The DoorKit!
  89.   ───────────────────────
  90.   This is a compilation of various procedures and functions by various authors
  91.   structured in such a way that I believe makes one of the most powerful BBS
  92.   door development kits available. The reason for me making this kit is because
  93.   out of all the door development kits out there I've tried (with source code)
  94.   they all fall short in one way or another. So what I have done is take all
  95.   of the the best features of numerous door kits, various source code samples
  96.   from SWAG, plus procedures I have written myself, and compiled one big door
  97.   development kit...
  98.  
  99.   If you are concerned with the legality of the methods used to develop this
  100.   kit, let's just say (for the sake of legal matters) that this kit is really
  101.   a "Parody" on other people's kits. Really, it's a parody.....I just have a
  102.   crappy sense of humor when it comes to programming. Parodies are legal and
  103.   cannot go hand in hand with plagiarism. Just ask Weird Al Yankovich...  :)
  104.  
  105.   If you are still concerned at this point, just look at it like this: Every
  106.   major door development kit out there does the same thing, the difference is
  107.   I'm admitting to the use of other people's code whereas they are not. Still
  108.   the code used in this kit has been completely modified to make it work hand
  109.   in hand with the rest of the kit, so none of these derivatives are any way
  110.   comparable to their original sources. Every part of TDK is 100% legal and in
  111.   no way violates any copyright laws...
  112.  
  113.   Do with this kit what you will....All I ask is if you find a better way of
  114.   doing something (which you will), please send me a copy of what you did so
  115.   that I can update future versions of this kit. Plus it will help me learn
  116.   more about the way other people work. My code bores me, I like looking at
  117.   other people's code to learn new tricks. I will also add your name to the
  118.   list shown below so you are given full credit for your work...
  119.  
  120.  
  121. ───────────────────────────────────────────────────────────────────────────────
  122.  
  123.  
  124.   Basic Features:
  125.   ───────────────
  126.   -Autodetects the caller's graphics rather than relying on drop file info.
  127.   -Supports ANSI/AVATAR/TTY/RIP/MAX graphics.
  128.   -Supports DOOR.SYS, DORINFOx.DEF, and MX_USER.DAT drop files.
  129.   -Full error trapping and logging of expected & unexpected errors.
  130.   -Full monitoring of carrier dropping and user inactivity time-outs.
  131.   -DOS, DesqView, Windows, and OS/2, multi-tasker friendly.
  132.   -Built in highly optimized Pascal 'EXEC' replacement.
  133.   -Painless, almost automatic overlay implementation.
  134.   -Overlays will load into XMS or EMS, which ever is available.
  135.   -Only leaves a 1.2K footprint in memory when swapped out.
  136.   -Automatic swapping to EMS -> XMS -> Disk.
  137.   -Supports Fossil, UART, and DigiBoard communications routines.
  138.   -Full support for non-standard port and IRQ settings.
  139.   -All door serial I/O settings are fully configurable.
  140.   -Program startup/initialization streamlined into one InitDoorKit command.
  141.   -Automatic handling of all program exit processes.
  142.   -Uses typed control files rather than text based INI files.
  143.   -Includes a freeware control file editor to distribute with your doors.
  144.   -Easily definable sysop "F-Keys", no Far Calls needed for these functions.
  145.   -Easily definable command line parameters.
  146.   -Full support for local and remote Cursor, Home, End, and Delete keys.
  147.   -Built in split screen and line by line chat modes with word wrapping.
  148.   -Numerous cosmetic procedures already written into the package.
  149.   -Numerous string handling procedures already written into the package.
  150.   -Numerous file handling procedures already written into the package.
  151.   -Built in questionnaire/script language.
  152.   -Built in online MAX/ANSI/ASCII text file reader procedure.
  153.   -Supports inline color tokens for coloring text files.
  154.   -Library of global system variable tokens for use in screen/text files.
  155.   -Includes procedures for full activity and error logging.
  156.  
  157.  
  158. ───────────────────────────────────────────────────────────────────────────────
  159.  
  160.  
  161.   What's New?
  162.   ───────────
  163.   -Majorly reduced TDK's memory requirements by eliminating the need for
  164.    the UltraBGI graphics kit.
  165.  
  166.   -Removed all BGI graphics code and replaced it with an add on kit that
  167.    allows you to write MAX doors in full local SVGA mode.
  168.  
  169.   -Removed the virtual screen procedures since they weren't really doing
  170.    anything noticable or worthwhile (other than eating up extra memory).
  171.  
  172.   -Removed quite a few redundant procedures from DOORKIT1.PAS such as the
  173.    sWriteN, sWritelnN, sWritelnC. No need for these procedures since you
  174.    can achieve the same results using other procedures in TDK.
  175.  
  176.   -Enhanced the activity logging header so it is more concise and easier
  177.    to read the initial start up data.
  178.  
  179.   -Hid the word VIRUS.COM in the DOORKIT1.PAS / PROCEDURE FakeVirus; because
  180.    a couple pinheads that had way too much time on their hands posted these
  181.    messages in the LoseNet LoserGroups (ie: UseNet NewsGroups) saying that
  182.    all BBS Utiliteez Software programs and all TDK doors actually contained
  183.    a virus in them by that file name. See the file WARNING.TXT for more info.
  184.  
  185.   -Fixed numerous bugs in the time slicing related procedures.
  186.  
  187.   -Fixed numerous cursor control bugs in the input prompt functions.
  188.  
  189.   -Fixed numerous bugs in both ANSI and ASCII chat procedures.
  190.  
  191.   -Fixed numerous bugs in the MAX command processing unit.
  192.  
  193.   -God only knows what else, it's too hard to keep track...<G>...
  194.  
  195.  
  196. ───────────────────────────────────────────────────────────────────────────────
  197.  
  198.  
  199.   Technical Information:
  200.   ──────────────────────
  201.   Sorry, this isn't going to be very extensive. The units included in this
  202.   package are commented pretty well, so there won't be a whole hell of a lot
  203.   documentation. Sorry about that, but if somebody else out there wants to
  204.   write complete documentation for it.....Have at it! I'm sure others will
  205.   probably thank you for it.....I really don't see the lack of documentation
  206.   being a problem since there has been this world-wide campaign initiated to
  207.   abolish the reading of documentation anyway...  ;)
  208.  
  209.   If you are really a hound for more information, just read all the other
  210.   *.DOC files contained in this archive. Since I am mainly concerned with
  211.   writing MAX Graphics programs, you will find the MAX*.DOC files to be a
  212.   lot more concise than this document...
  213.  
  214.   The example doors ANSIDOOR.PAS and MAXDOOR.PAS both demonstrate the basics
  215.   of writing doors with TDK and are both fully commented. Experimentation is
  216.   the mother of invention, so the best thing to do is just start tinkering
  217.   with things and see what they do. The procedure/function headers in all of
  218.   the units are commented as well, so even a newbie Pascal programmer should
  219.   be able to understand what everything does...
  220.  
  221.  
  222.   Door Initialization:
  223.   ────────────────────
  224.   The DoorKit uses binary, or "Typed" files for storing the configuration for
  225.   each node. The naming convention for these "Control Files" is NODE###.CTL
  226.   with the ### representing the current node number. I have included a little
  227.   utility for creating/editing these control files. You may package this in
  228.   your doors, or you may write your own configuration routines to handle it.
  229.  
  230.   The program MAKECTL.EXE is the control file editor. You simply execute it
  231.   with the node number on the command line to tell the program which node you
  232.   wish to create or edit the control file for. You may also wish to write a
  233.   procedure to read text based control files. I don't like text files because
  234.   they just slow down a program. A typed file is just a one shot open, read,
  235.   and close. Whereas text files always require you to read a line, translate
  236.   it into data the door can use, and repeat the process until you have all of
  237.   your critical variables set. (Can we say: Sloooooowwwww?) Sorry, the source
  238.   code for MAKECTL.EXE is not available since it uses commercial development
  239.   libraries. You can just as easily create a CTL file editor with procedures
  240.   in TDK itself or any other development kit of your choice...
  241.  
  242.  
  243.   Windows CTL File Editors:
  244.   ─────────────────────────
  245.   There are two Windows versions of the CTL file editor available which were
  246.   written by Brad Larned of FzSoft. There are both 16 and 32 bit versions and
  247.   both can be Freq'ed or downloaded from the USA MAX Graphics HQ-BBS. Below
  248.   are the file names for each version:
  249.  
  250.   WTDK1610.RAR - 16 bit Windows TDK CTL file editor.
  251.   WTDK3210.RAR - 32 bit Windows TDK CTL file editor.
  252.  
  253.   These programs can be bundled with any program you write with TDK. For more
  254.   information, contact Brad Larned (brad@psnw.com) 1:205/65@FidoNet...
  255.  
  256.  
  257.   Shutting Down Your Door:
  258.   ────────────────────────
  259.   There is no need to call any special procedure to shut down The DoorKit at
  260.   the end of your program. If you look at the _EXIT.PAS unit, you will notice
  261.   that there is automatic error handling in this kit. Even if your door exits
  262.   with a runtime error, all of the required exit processes will be taken care
  263.   of for you. You can add steps to the exit process with AddToExitChain. Just
  264.   read the comments in the _EXIT.PAS unit and you'll see how simplified the
  265.   exit or shutdown process is. What's more is if your program bails out with
  266.   a runtime error, a detailed description of the error is written to an error
  267.   log file. Believe me, this _EXIT.PAS is a lifesaver of a unit!
  268.  
  269.  
  270.   Writing InterBBS Compatible Doors:
  271.   ──────────────────────────────────
  272.   TDK has no built in capabilities for writing InterBBS compatible doors due
  273.   to the fact that there is no standard for this kind of thing. There is no
  274.   way for me to know what type of data you need to share between BBSes, so I
  275.   simply can't put anything in TDK to support that. However, writing InterBBS
  276.   doors really involves nothing more that adding the capability to write Fido
  277.   style *.MSG files with other files attached to them and being able to scan
  278.   for new inbound *.MSG files with files attached to them. It has always been
  279.   up to the program author to write the routines to unpack the archives, then
  280.   import/export the door data to other systems. So, technically, all you need
  281.   is the capability to read and write the *.MSG files. Luckily, there is one
  282.   set of units available for this type of thing. MKSM106, by Mark May is the
  283.   most complete message base access kit available. This kit supports Squish,
  284.   JAM, Hudson, EzyCom, and Fido *.MSG message base formats. You can find it
  285.   on Mark May's BBS (937)237-7737, 1:110/290@FidoNet. You may also download
  286.   or freq the file MKSM106.RAR from the USA MAX Graphics HQ-BBS. By combining
  287.   TDK with MKSM106, you have everything you need to write InterBBS doors...
  288.  
  289.  
  290.   Writing MAX Compatible Doors:
  291.   ─────────────────────────────
  292.   Writing a MAX compatible door is actually easy with TDK, what makes it even
  293.   easier yet is The MAX Graphics GUI Kit. This is an add on kit to TDK that
  294.   allows you to write a MAX door in full local SVGA mode. This kit requires
  295.   at least a shareware copy of the FastGraph/Light graphics kit. Everything
  296.   you need is available from the USA MAX Graphics HQ-BBS or the web site. The
  297.   file name for The MAX Graphics GUI kit is MXGUI + MAXscript Version + .RAR,
  298.   or MXGUI###.RAR where ### is the current MAXscript version number. You may
  299.   jump to the FastGraph web site (www.fastgraph.com) from the MAX Graphics
  300.   web site (http://home.att.net/~maxgfx) and pick up the most recent version
  301.   of the FastGraph graphics development kit...
  302.  
  303.  
  304.   The TDK Unit Descriptions:
  305.   ──────────────────────────
  306.   ASYNC.PAS    - The UART communications unit.
  307.   ANSIUNIT.PAS - The local ANSI display unit.
  308.   CHECKPAT.PAS - Used by EXEC.PAS for checking the DOS path.
  309.   COMM.PAS     - The main communications handler unit.
  310.   CRCUNIT.PAS  - Used for calculating file and string CRC32 values.
  311.   DIGIBORD.PAS - The DigiBoard communications unit.
  312.   DOORKIT1.PAS - The main TDK unit, startup, shutdown and critical routines.
  313.   DOORKIT2.PAS - The TDK string and file handling unit.
  314.   DOORKIT3.PAS - The TDK ANSI output unit, TDK's ANSI display nerve center.
  315.   EXEC.PAS     - The child process & DOS shell unit.
  316.   FOSUNIT.PAS  - The fossil communications unit.
  317.   GENOVR.PAS   - The automatic overlay generator unit.
  318.   OVERXMS.PAS  - Allows overlays to load into XMS rather than EMS memory.
  319.   MAX_UNIT.PAS - Processes and sends MAXscript/MAXcontrol/MAXcolor commands.
  320.   TDK_VARS.PAS - All of TDK's global variables and time slicing.
  321.   _EXIT.PAS    - The runtime error trapping and auto shutdown unit.
  322.  
  323.  
  324. ───────────────────────────────────────────────────────────────────────────────
  325.  
  326.  
  327.   Nine Ways To Hack/Crack Protect Your Doors:
  328.   ───────────────────────────────────────────
  329.   Unless you are like me (primarily a freeware author) you are faced with the
  330.   constant threat of someone cracking your door or hacking out copies of it.
  331.   Granted that there is no fool proof method of preventing this, however, you
  332.   can take measures to lessen the likelihood of this happening. Below are a
  333.   few tips to help you secure your programs:
  334.  
  335.   1. Don't release a shareware program that is capable of being thrown into
  336.      full registered mode by entering a code or dropping a key file into the
  337.      program directory. Registration codes can be figured out quite easily,
  338.      and most key files are easily cracked as well. The best way to prevent
  339.      this is to release your shareware programs without the full registered
  340.      features compiled into it. Make your registered versions require a new
  341.      executable with the registered user's name compiled into it. When ever
  342.      you get a registration, then send the user a registered status program
  343.      executable instead of a key file or registration code. It's no harder
  344.      to do this than it is to send them a key file or registration code...
  345.  
  346.   2. Don't ever put procedures or information in an overlay file that could
  347.      be altered in order to make your program appear to be registered. These
  348.      are probably the easiest file for a cracker to modify. Overlays cannot
  349.      be encrypted like executables unless someone has invented some new and
  350.      improved overlay manager that I'm not aware of. Critical procedures and
  351.      information that control your program's security should always be kept
  352.      in the executable, and the executable should always be encrypted...
  353.  
  354.   3. Don't ever rely on CRC values of anything as registration codes! This
  355.      is the first thing that a cracker will try when attempting to figure
  356.      out a registration code. Yes, to the average user, CRC values of names
  357.      look like a very reliable way of generating registration codes because
  358.      they aren't visually readble or decipherable. But a cracker or another
  359.      programmer will look at this as a kindergarten toy, and will have your
  360.      registration codes figured out in about a minute or less. The only time
  361.      you should use CRC values is for things that don't control the overall
  362.      program security...
  363.  
  364.   4. Don't ever rely on PKLITE or other similar executable compressors for
  365.      securing an executable. Numerous programs out there can decompress a
  366.      compressed executable. The UNP.EXE utility is a very popular tool for
  367.      crackers because it can decompress any compressed executable. Yes, it
  368.      will even decompress a so called "Permanently Compressed" PKLITE'ed
  369.      executable. If you want to secure an executable, you will be further
  370.      ahead to use an executable encryption program. The very best one you
  371.      can get is called "Protect!" from Jeremy Lilley. This utility can be
  372.      found on most any shareware CD-ROM, or you can reach the author at the
  373.      addresses listed below:
  374.  
  375.      Jeremy Lilley
  376.      Protect! EXE/COM
  377.      2711 Oak View Circle
  378.      Medford, Oregon 97504
  379.      Email: jjlilley@mit.edu  * CompuServe: 75060,2074
  380.        URL: http://web.mit.edu/jjlilley/www/protect.html
  381.  
  382.   5. If you do insist on using key files to register your program, it's best
  383.      to use a key generation unit where the author is the only person that
  384.      has the source code to it. Think about it, if you use something where
  385.      anybody that registers the key generator gets the source code, then any
  386.      cracker out there will be able to figure out how to crack the keys made
  387.      by your generator. You should _only_ use a key generator where all you
  388.      get is the .TPU file itself. The absolute best key generation unit for
  389.      Pascal is called "KeyCode" by Bob Westcott. Bob is the only one with the
  390.      source code and his keys are going on a 10 year record of NEVER being
  391.      cracked. You can reach Bob Westcott at:
  392.  
  393.      Bob Westcott
  394.      Rt #1 Box 231A
  395.      Macomb, OK  74852
  396.      Voice      405-333-2252
  397.      Data(BBS)  405-333-2424
  398.      FAX        405-333-2424
  399.      FidoNet    1:147/48
  400.      Internet   westcott@telepath.com
  401.                 http://www.telepath.com/westcott
  402.  
  403.   6. Don't ever base your registered status on whether or not a program just
  404.      displays a text string that says "Registered" or "Unregistered". This
  405.      can easily be changed by loading the executable into a hex editor and
  406.      typing over the word "Unregistered". If your program is actually fully
  407.      functional with the exception of the text string it displays, you can
  408.      hide the string so that it doesn't appear in a hex editor, thus making
  409.      the little crackers out there very frustrated. Use this technique, you
  410.      may also use this technique to hide the registered user's name in the
  411.      executable as well:
  412.  
  413.                              {000000000111111111122222222}
  414.      CONST                   {123456789012345678901234567}
  415.        Alpha1 : STRING[27] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.';
  416.        Alpha2 : STRING[27] = 'abcdefghijklmnopqrstuvwxyz!';
  417.  
  418.      VAR
  419.        Unregistered : STRING[13];
  420.        Registered   : STRING[10];
  421.  
  422.      PROCEDURE SetRegStrings;
  423.      BEGIN
  424.        Registered   := COPY(Alpha1,18,1) +
  425.                        COPY(Alpha2,5,1) +
  426.                        COPY(Alpha2,7,1) +
  427.                        COPY(Alpha2,9,1) +
  428.                        COPY(Alpha2,19,1) +
  429.                        COPY(Alpha2,20,1) +
  430.                        COPY(Alpha2,5,1) +
  431.                        COPY(Alpha2,18,1) +
  432.                        COPY(Alpha2,5,1) +
  433.                        COPY(Alpha2,4,1);
  434.  
  435.        Unregistered := COPY(Alpha1,21,1) +
  436.                        COPY(Alpha1,14,1) +
  437.                        COPY(Alpha1,18,1) +
  438.                        COPY(Alpha1,5,1) +
  439.                        COPY(Alpha1,7,1) +
  440.                        COPY(Alpha1,9,1) +
  441.                        COPY(Alpha1,19,1) +
  442.                        COPY(Alpha1,20,1) +
  443.                        COPY(Alpha1,5,1) +
  444.                        COPY(Alpha1,18,1) +
  445.                        COPY(Alpha1,5,1) +
  446.                        COPY(Alpha1,4,1) +
  447.                        COPY(Alpha2,27,1);
  448.      END;
  449.  
  450.      Using the above technique allows you to display the words "Registered"
  451.      and "Unregistered" in your programs, but if the executable is loaded
  452.      in a hex editor, the strings of text never show. You can copy letters
  453.      from the two alpha strings to create any string of text you want, and
  454.      the string will be basically invisible to peering eyes...
  455.  
  456.   7. If you use the above method to hide the person's name and BBS name in
  457.      your executables, you should always compare this information against
  458.      the sysop name or BBS name in the drop file. Keep in mind that certain
  459.      drop files contain information that other drop files don't. So you'll
  460.      want to design your programs to adjust to the drop file. Chances are a
  461.      person won't change the name of their BBS or the sysop name in the BBS
  462.      just so they can run a hacked copy of your program...
  463.  
  464.   8. This is the one that I've gotten the most ridicule for suggesting, but
  465.      it works. Though it's not fool proof, it does ruin the fun for people
  466.      that like to give registered copies of your programs out to others. If
  467.      it's good for the big commercial companies, then I figure it's just as
  468.      good for shareware authors. If you use custom compiled executables as
  469.      part of your registration method, besides hiding the registered user's
  470.      name in the executable, require the registered user to also give you
  471.      the volume ID and serial number of the hard drive the program will be
  472.      installed on and make your program dependent on that. As I said, this
  473.      isn't fool proof because you can easily change your hard drive label
  474.      and serial number with some low level programming. But, this can HELP
  475.      prevent people from handing out registered copies to other people...
  476.  
  477.   9. Executable compression can be used to HELP prevent tampering, though it
  478.      takes some tap dancing to make it work. One technique that some people
  479.      use is to compile the program, PKLITE the executable, and then note the
  480.      size of the executable. Say that the compressed executable is 100,000
  481.      bytes. You put a routine in your program startup to check the file size
  482.      and if the file size isn't exactly 100,000 bytes, then have your program
  483.      halt. Always use PARAMSTR(0) as the file name when checking in case the
  484.      executable was renamed by the user in an attempt to get around this. As
  485.      I said, it takes some tap dancing because sometimes the executable may
  486.      compress differently each time. So rather than use an exact figure, you
  487.      may want to make the upper limit of the file size a little larger. Like,
  488.      instead of checking to see if it's 100,000 bytes, tell your program that
  489.      if the executable is greater than 100,020 bytes, then the executable has
  490.      been altered and the program should shut down...
  491.  
  492.  
  493. ───────────────────────────────────────────────────────────────────────────────
  494.  
  495.  
  496.   Enforcing Program Test Drive Periods:
  497.   ─────────────────────────────────────
  498.   As you probably well know, it doesn't matter one way or the other to most
  499.   sysops if doors on their system say they are registered or not. I've seen
  500.   some sysops run doors for up to three years without registering them, when
  501.   the program documentation clearly explains the 30 day test drive period...
  502.  
  503.   Believe it or not, you actually can enforce this 30 day limit and it won't
  504.   make any difference if the sysop back dates their system or not. What I've
  505.   done is just look for directories on the person's hard drive that you can
  506.   hide files in. Great things to look for are C:\DOS, C:\WINDOWS, C:\OS2, or
  507.   any other directory of your choice. It's best to use more than one file to
  508.   keep track of dates and days run. If you look at the structure of the .CTL
  509.   files, you'll see that there are date fields in there. What you will want
  510.   to use is the .CTL file as well as two other files stored in other places
  511.   on the hard drive using inconspicuous file names. Every time the door runs
  512.   you will want to check the system date, then check the dates stored in all
  513.   three files. If the dates don't match, then increment your day counter...
  514.  
  515.   The reason for the use of three different files is because there is always
  516.   the chance one of these files may get deleted. If this happens, you still
  517.   have two more files that you can check, and then just rewrite the deleted
  518.   file again. Be sure that all three files are stored in different places as
  519.   well. This way if the sysop tries to delete the program and re-install it
  520.   in order to get around the 30 day trial, you still have the other backup
  521.   files on the hard drive that you can read the counters/dates out of. When
  522.   your counter hits 30 days (or whatever limit), you force your door to exit
  523.   with an expiration message...Wella'...Your door now enforces your program
  524.   test drive period...
  525.  
  526.  
  527. ───────────────────────────────────────────────────────────────────────────────
  528.                               ANSI ESCAPE SEQUENCES
  529. ───────────────────────────────────────────────────────────────────────────────
  530.  
  531. Wherever you see '#', that should be replaced by the appropriate number.
  532.  
  533.         ESC code sequence                       Function
  534.        -------------------              ---------------------------
  535. Cursor Controls:
  536.          ESC[#;#H or ESC[#;#f           Moves cusor to line #, column #
  537.          ESC[#A                         Moves cursor up # lines
  538.          ESC[#B                         Moves cursor down # lines
  539.          ESC[#C                         Moves cursor forward # spaces
  540.          ESC[#D                         Moves cursor back # spaces
  541.          ESC[#;#R                       Reports current cursor line & column
  542.          ESC[s                          Saves cursor position for recall later
  543.          ESC[u                          Return to saved cursor position
  544.  
  545. Erase Functions:
  546.          ESC[2J                         Clear screen and home cursor
  547.          ESC[K                          Clear to end of line
  548.  
  549. Set Graphics Rendition:
  550.          ESC[#;#;....;#m                Set display attributes where # is
  551.                         0 for normal display
  552.                                             1 for bold on
  553.                                             4 underline (mono only)
  554.                                             5 blink on
  555.                                             7 reverse video on
  556.                                             8 nondisplayed (invisible)
  557.                                             30 black foreground 
  558.                                             31 red foreground 
  559.                                             32 green foreground 
  560.                                             33 yellow foreground 
  561.                                             34 blue foreground 
  562.                                             35 magenta foreground 
  563.                                             36 cyan foreground 
  564.                                             37 white foreground
  565.                                             40 black background
  566.                                             41 red background
  567.                                             42 green background
  568.                                             43 yellow background
  569.                                             44 blue background
  570.                                             45 magenta background
  571.                                             46 cyan background
  572.                                             47 white background
  573.  
  574.      ESC[=#;7h or                   Put screen in indicated mode where # is
  575.  
  576.          ESC[=h or                          0 for 40 x 25 black & white
  577.          ESC[=0h or                         1 for 40 x 25 color
  578.          ESC[?7h                            2 for 80 x 25 b&w
  579.                                             3 for 80 x 25 color
  580.                                             4 for 320 x 200 color graphics
  581.                                             5 for 320 x 200 b & w graphics
  582.                                             6 for 640 x 200 b & w graphics
  583.                                             7 to wrap at end of line 
  584.  
  585.          ESC[=#;7l or ESC[=l or         Resets mode # set with above command
  586.          ESC[=0l or ESC[?7l
  587.  
  588. Keyboard Reassignments:
  589.          ESC[#;#;...p                   Keyboard reassignment. The first ASCII
  590.          or ESC["string"p               code defines which code is to be 
  591.          or ESC[#;"string";#;           changed. The remaining codes define
  592.             #;"string";#p               what it is to be changed to.
  593.  
  594.          E.g. Reassign the Q and q keys to the A and a keys (and vice versa).
  595.          ESC [65;81p                    A becomes Q
  596.          ESC [97;113p                   a becomes q
  597.      ESC [81;65p                    Q becomes A
  598.          ESC [113;97p                   q becomes a
  599.  
  600.          E.g. Reassign the F10 key to a DIR command.
  601.          ESC [0;68;"dir";13p            The 0;68 is the extended ASCII code 
  602.                                         for the F10 key and 13 is the ASCII
  603.                                         code for a carriage return.
  604.          
  605.          Other function key codes       F1=59,F2=60,F3=61,F4=62,F5=63
  606.                                         F6=64,F7=65,F8=66,F9=67,F10=68
  607.  
  608.  
  609. ───────────────────────────────────────────────────────────────────────────────
  610.                                DROP FILE FORMATS
  611. ───────────────────────────────────────────────────────────────────────────────
  612.  
  613.         Filename:  DORINFO1.DEF
  614.      Description:  A standard exit file created in the current
  615.                    (node) directory. This is a standard ASCII
  616.                    text file used by many external programs.
  617.                    This is a very limited exit file, but this
  618.                    just so happens to be a standard amongst a
  619.                    large number of BBS packages.
  620.  
  621.           Line 1:  System name
  622.           Line 2:  Sysop first name
  623.           Line 3:  Sysop last name
  624.           Line 4:  Communications port in use (COM0 if local)
  625.           Line 5:  Communications port settings:
  626.                    BPS rate,parity,data bits,stop bits
  627.                    The BPS rate is specified as 0 during local sessions
  628.                    and is followed by the word BAUD.  During error-
  629.                    free connects, the word BAUD is followed by -R.
  630.                    The parity setting is always set to N for no parity.
  631.                    The data bits are always set to 8 and the stop bits
  632.                    are always set to 1.
  633.           Line 6:  Reserved (always zero)
  634.           Line 7:  User first name
  635.           Line 8:  User last name
  636.           Line 9:  User location
  637.           Line 10: User emulation (0=ASCII, 1=ANSI, 2=AVATAR)
  638.           Line 11: User security level
  639.           Line 12: User time remaining (in minutes)
  640.           
  641. ───────────────────────────────────────────────────────────────────────────────
  642.           
  643.         Filename:  DOOR.SYS
  644.      Description:  A standard exit file created in the current
  645.                    (node) directory. This is a standard ASCII
  646.                    text file used by many external programs.
  647.                    Although this exit file is extremely detailed
  648.                    and includes information that cannot be
  649.                    generated by every BBS type, efforts were made
  650.                    to include as much information as possible.
  651.  
  652.           Line 1:  Communications port (COM0: if local)
  653.           Line 2:  BPS rate
  654.           Line 3:  Data bits
  655.           Line 4:  Node number
  656.           Line 5:  DTE rate (locked rate)
  657.           Line 6:  Screen display (snoop) (Y=On N=Off)
  658.           Line 7:  Printer toggle (Y=On N=Off)
  659.           Line 8:  Page bell (Y=On N=Off)
  660.           Line 9:  Caller alarm (Y=On N=Off)
  661.           Line 10: User full name
  662.           Line 11: User location
  663.           Line 12: Home/voice telephone number
  664.           Line 13: Work/data telephone number
  665.           Line 14: Password
  666.           Line 15: Security level
  667.           Line 16: User's total number of calls to the system
  668.           Line 17: User's last call date
  669.           Line 18: Seconds remaining this call
  670.           Line 19: Minutes remaining this call
  671.           Line 20: Graphics mode (GR=ANSI, NG=ASCII)
  672.           Line 21: Screen length
  673.           Line 22: User mode (always set to N)
  674.           Line 23: Always blank
  675.           Line 24: Always blank
  676.           Line 25: Subscription expiration date
  677.           Line 26: User's record number
  678.           Line 27: Default protocol
  679.           Line 28: User's total number of uploads
  680.           Line 29: User's total number of downloads
  681.           Line 30: User's daily download kilobytes total
  682.           Line 31: Daily download kilobyte limit
  683.  
  684.         { Short DOOR.SYS stops at line #31 }
  685.  
  686.           Line 32: User's date of birth
  687.           Line 33: Path to the user database files
  688.           Line 34: Path to the message database files
  689.           Line 35: Sysop full name
  690.           Line 36: User's handle (alias)
  691.           Line 37: Next event starting time
  692.           Line 38: Error-free connection (Y=Yes N=No)
  693.           Line 39: Always set to N
  694.           Line 40: Always set to Y
  695.           Line 41: Default text color
  696.           Line 42: Always set to 0
  697.           Line 43: Last new files scan date
  698.           Line 44: Time of this call
  699.           Line 45: Time of last call
  700.           Line 46: Always set to 32768
  701.           Line 47: Number of files downloaded today
  702.           Line 48: Total kilobytes uploaded
  703.           Line 49: Total kilobytes downloaded
  704.           Line 50: Comment stored in user record
  705.           Line 51: Always set to 0
  706.           Line 52: Total number of messages posted
  707.  
  708.  
  709. ───────────────────────────────────────────────────────────────────────────────
  710.  
  711.  
  712.   Entry Form Script Files:
  713.   ────────────────────────
  714.   This is a basic list of instructions for TDK scripts to follow which tell
  715.   it what screen file to display, what to write on the screen, what type and
  716.   length of entry fields to place on the screen, what text file to write the
  717.   entry field data to, etc. The array of commands is small, but there are a
  718.   lot of possibilities for their use. A total of 50 entry fields per script
  719.   are allowed which should be plenty to gather all the information you need.
  720.   The script files are read from top to bottom and all information entered
  721.   in the script is displayed exactly in that order. Global System Variables
  722.   are allowed throughout the entire script file as well. Also, the script
  723.   commands are not case sensitive to make them easier to use. All commands
  724.   must be on a line by themselves, you cannot have more than one command on
  725.   each line. For an example of an Entry Form Script File, take a look at the
  726.   file QUEST1.FRM...Refer to DOORKIT3.PAS / RunEntryForm for more details...
  727.  
  728.  
  729.   Script Commands And Format:
  730.   ───────────────────────────
  731.   ScreenFile@   - This is the name of a screen file that you would like to
  732.                   display. Screen files can be displayed at any time in the
  733.                   script. Do not include a file extension on the screen file
  734.                   name since this will be determined by the user's graphics
  735.                   capabilities. However, you must include the full path to
  736.                   the screen file.
  737.  
  738.   ShowTextFile@ - This command displays a text file of your choice. All you
  739.                   do is this: ShowTextFile@C:\DOOR\FEATURES.TXT and the text
  740.                   file will be displayed to the user until they select Quit.
  741.  
  742.   Cls@          - This simply clears the screen.
  743.  
  744.   TextFile@     - This is the name of the text file that you wish to output
  745.                   the data from all of your entry fields. This file should
  746.                   be declared at the beginning of your script. Only one text
  747.                   file is allowed per script file.
  748.  
  749.   LineFeed@     - This simply draws a blank line on the screen.
  750.  
  751.   AnyKey@       - This prompts the user to press any key to continue.
  752.  
  753.   PromptText@   - This command precedes any text that you wish to display on
  754.                   the screen. To display a prompt to ask a user for his/her
  755.                   phone number you would simply add this line to your script:
  756.                   "PromptText@What Is Your Phone Number?" (Without the quotes)
  757.  
  758.   NormalPrompt@ - This is the first of the entry fields, each entry field has
  759.                   two parameters separated by an "@" code. The first parameter
  760.                   is the length of the field (1 To 255). The second is the
  761.                   default data to "Stuff" into the field. The normal prompt
  762.                   accepts your input exactly as you type it, no capitalization
  763.                   or correction is performed. If you wanted to get the user's
  764.                   main BBS interests in a field that is 30 characters wide and
  765.                   stuff it with some default data, you would do this:
  766.                   NormalPrompt@30@Your Main BBS Interests Are
  767.                   The result is this: [Your Main BBS Interests Are___]
  768.                   If you want a blank field 30 characters wide, do this:
  769.                   NormalPrompt@30
  770.                   The result is this: [______________________________]
  771.  
  772.   NumberPrompt@ - This performs the same way as the above, except that this
  773.                   field only allows numeric characters as input.
  774.  
  775.   ProperPrompt@ - The same rules apply here as well except that this field
  776.                   automatically capitalizes the first letter of each word.
  777.                   Use this for getting names or city, state, street names.
  778.  
  779.   HiddenPrompt@ - Again, the same rules apply with the exception that the
  780.                   user never sees their input. All they see are dots in the
  781.                   field whenever they enter a character. Use this for getting
  782.                   passwords, etc....
  783.  
  784.   CapitalPrompt@ - Once again, the same rules apply with the exception that
  785.                    every character entered in this field is capitalized. You
  786.                    can use this for getting file names or country names, etc.
  787.  
  788.   OutText@      - This is used to output text and field data to the text file
  789.                   you declared with the TextFile@ command. This is another
  790.                   command with two parameters separated by an "@" code. The
  791.                   first parameter is any text that you want to write to the
  792.                   text file. Entering an OutText@ all by itself will simply
  793.                   write a blank line to the text file. If you want to write
  794.                   your BBS name to a line, do this: OutText@{BBS}
  795.                   If want to add a line of text and the data from the first
  796.                   entry field, do this: OutText@Main BBS Interests : @1
  797.  
  798.   RunBatchFile@ - This is used in a script to run an external batch file. In
  799.                   some cases you may find a need to run an external door or
  800.                   have Max-Menu shell out and do some DOS file manipulation.
  801.                   The batch file doesn't have to execute a door, it can run
  802.                   any program. Some people may want to send a file to users
  803.                   with some kind of an external protocol driver. Your script
  804.                   file would simply show: RunBatFile@C:\DOOR\FILENAME.BAT or
  805.                   whatever the batch file name happens to be. You may also
  806.                   pass parameters to your batch file as well through the use
  807.                   of Global System Variables or your own parameters.
  808.  
  809.  
  810. ───────────────────────────────────────────────────────────────────────────────
  811.  
  812.  
  813.   Credits:
  814.   ────────
  815.  
  816.   Larry L. Athey  - The structure of TDK, numerous complex procedures,
  817.                     numerous "Artsy/Fartsy" procedures, and the concept
  818.                     & design of MAX Graphics itself.
  819.  
  820.   Brad Larned     - Special thanks to Brad Larned of The Fresno Online BBS
  821.                     (209)276-3657 (owner of FzSoft Software) for releasing
  822.                     the very first door (outside of my own) written using
  823.                     TDK!!! Also, for doing virtually all of the debugging
  824.                     of the first version of TDK as well as releasing the
  825.                     very first MAX compatible SVGA door. Brad is also the
  826.                     author of the Windows TDK CTL file editors.
  827.  
  828.   Sean Price      - Special thanks to Sean Price of Rude Dog Software for
  829.                     fixing a problem that has been a burden since the
  830.                     beginning of MAX Graphics. The proper color averaging
  831.                     of PCX images is now fixed thanks to Sean. Sean as well
  832.                     as Brad Larned were the very first MAXecutable program
  833.                     creators, for more information on Rude Dog Software,
  834.                     contact the Sanctuary From The Law BBS (619)377-3611.
  835.  
  836.   Jon Parise      - Special thanks to Jon Parise of ntsSoft for numerous
  837.                     suggestions, enhancements and ideas. Who says you've
  838.                     got to be old to be wise? This guy's young, but he's
  839.                     probably got a better grasp on BBS/Door development
  840.                     than people twice his age. You can reach Jon Parise
  841.                     at 1:2606/421@FidoNet, jon@interpow.net, or you can
  842.                     also reach his BBS at (908)637-8243.
  843.  
  844.   Dorinda D Hayek - Major contribution to the MAX Graphics development kit
  845.                     and made a number of changes in TDK v1.10 to optimize
  846.                     performance and enhance features. Her contribution to
  847.                     TDK v1.10 made the quick release of v1.20 possible.
  848.  
  849.   SWAG Support    - The SourceWare Archival Group. A HUGE amount of code in
  850.                     this kit came from SWAG. Since there are too many people
  851.                     to name, I will simply pay credit to "SWAG" here.
  852.  
  853.   Thomas Wagner   - The EXEC.PAS unit and supporting files. This is a great
  854.                     unit specifically designed to replace the EXEC command in
  855.                     Pascal. The unit has built in memory swapping and when
  856.                     you execute a child process or drop to DOS, only a 1.2K
  857.                     foot print is left in memory thus giving the most free
  858.                     memory to run external programs.
  859.  
  860.   Anybody Else?   - If there is a chance that I'm using code in this kit from
  861.                     anybody I neglected to mention, sorry about that. Let me
  862.                     know and tell me what portion of the code it is that you
  863.                     are the author of and I'll add your name to the list.
  864.  
  865.  
  866. ───────────────────────────────────────────────────────────────────────────────
  867.  
  868.  
  869.       ┌───────────────────────────────────────────────────────────────────┐
  870.       │                                                                   │
  871.       │  ┌──      ┌──────           ┌──────   ┌──────  ┌────── ┌────────  │
  872.       │  ┌──     ┌──   ┌──         ┌──       ┌──   ┌── ┌──        ┌──     │
  873.       │  ┌──     ┌────────  ┌────   ┌──────  ┌──   ┌── ┌────      ┌──     │
  874.       │  ┌──     ┌──   ┌──               ┌── ┌──   ┌── ┌──        ┌──     │
  875.       │  ┌────── ┌──   ┌──          ┌──────   ┌──────  ┌──        ┌──     │
  876.       │                                                                   │
  877.       └───────────────────────────────────────────────────────────────────┘
  878.  
  879.                 Not just software....It's a computer enhancement!
  880.  
  881.       ┌───────────────────────────────────────────────────────────────────┐
  882.       │ Contact: 1:14/703@FidoNet             Or: USA MAX Graphics HQ-BBS │
  883.       │          411:1500/0@ivNET                 (308)762-2239           │
  884.       │          121:101/2@AllianceNet            FAX or Data Calls       │
  885.       │          maxgfx@juno.com                  ANSI/ASCII/MAX (No RIP) │
  886.       └───────────────────────────────────────────────────────────────────┘
  887.  
  888.  
  889. ───────────────────────────────────────────────────────────────────────────────
  890.